package com.example.managesystem.web;

import com.example.managesystem.entity.city;
import com.example.managesystem.entity.user;
import com.example.managesystem.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("index")
public class cityController {
    @Autowired
    private CityService CityService;

    /**
     * @description:  城市查询
     * @param: [mod]
     * @return: java.lang.String
     * @author Yang
     * @date: 2022/6/22 23:27
     */
    @RequestMapping("/user-profile-lite")
    public String city(ModelMap mod){
        List<city> list = CityService.selectCity();
        mod.put("CityList",list);
        user user = new user();
        mod.addAttribute("UserInfo",user);
        return "/user-profile-lite";
    }
}
